#ifndef TESTNODE_H
#define TESTNODE_H

#include <QObject>
#include <QStringList>
#include <QDataStream>
#include <cmath>

class TestNode : public QObject
{
public:
    TestNode();
    TestNode(const TestNode &testNode);

    void setQuestion(const QString &question);
    void addAnswer(const QString &answer, quint16 real = 0);
    void setReals(quint16 reals);
    void setAnswers(const QStringList &answers);

    QString getQuestion() const;
    QStringList getAnswers() const;
    bool checkAnswers(quint16 r_answers);
    quint16 getReals() const;

    quint32 count() const;

    TestNode& operator =(const TestNode &testNode);

private:
    QString question;
    QStringList answers;
    quint16 reals;
};

QDataStream& operator <<(QDataStream &out, const TestNode &testNode);
QDataStream& operator >>(QDataStream &in, TestNode &testNode);

#endif // TESTNODE_H
